<template>
  <div class="home">
    <!-- 欢迎区域 -->
    <section class="welcome-section">
      <div class="welcome-content">
        <h2>欢迎来到嘟嘟汉字学习！</h2>
        <p class="subtitle">让我们一起探索汉字的奥秘吧！</p>
        <div class="feature-grid">
          <div class="feature-card" @click="$router.push('/practice')">
            <div class="feature-icon">✏️</div>
            <h3>笔画练习</h3>
            <p>练习汉字的正确书写顺序</p>
          </div>
          <div class="feature-card" @click="$router.push('/words')">
            <div class="feature-icon">🔤</div>
            <h3>组词示例</h3>
            <p>学习汉字的常用词语搭配</p>
          </div>
          <div class="feature-card" @click="$router.push('/exam')">
            <div class="feature-icon">📚</div>
            <h3>汉字考试</h3>
            <p>测试自己的汉字知识</p>
          </div>
        </div>
      </div>
    </section>

    <!-- 学习统计 -->
    <section class="stats-section">
      <div class="stats-grid">
        <div class="stat-item">
          <div class="stat-number">1000</div>
          <div class="stat-label">基础汉字</div>
        </div>
        <div class="stat-item">
          <div class="stat-number">1000</div>
          <div class="stat-label">组词示例</div>
        </div>
        <div class="stat-item">
          <div class="stat-number">∞</div>
          <div class="stat-label">练习机会</div>
        </div>
      </div>
    </section>
  </div>
</template>

<script setup lang="ts">


</script>

<style scoped>
.home {
  max-width: 1000px;
  margin: 0 auto;
  height: 100%;
  min-height: 500px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.welcome-section {
  text-align: center;
  padding: 10px 20px;
  background: white;
  border-radius: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
}

.welcome-section h2 {
  font-size: 2.5rem;
  color: #ff6b6b;
  margin-bottom: 10px;
}

.subtitle {
  font-size: 1.2rem;
  color: #666;
  margin-bottom: 40px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.feature-card {
  background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
  padding: 30px 20px;
  border-radius: 15px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 15px;
}

.feature-card h3 {
  color: #ff6b6b;
  margin-bottom: 10px;
}

.feature-card p {
  color: #666;
  line-height: 1.5;
}

.quick-start {
  background: white;
  padding: 30px;
  border-radius: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
}

.quick-start h3 {
  text-align: center;
  color: #ff6b6b;
  margin-bottom: 20px;
  font-size: 1.5rem;
}

.hanzi-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.hanzi-btn {
  padding: 20px 25px;
  font-size: 2.5rem;
  border: none;
  border-radius: 15px;
  background: linear-gradient(135deg, #ffd166 0%, #ffd166 100%);
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.hanzi-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.stats-section {
  background: white;
  padding: 30px;
  border-radius: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
}

.stat-item {
  text-align: center;
  padding: 20px;
  background: linear-gradient(135deg, #e0f7fa 0%, #b2ebf2 100%);
  border-radius: 15px;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: bold;
  color: #ff6b6b;
  margin-bottom: 5px;
}

.stat-label {
  color: #666;
  font-size: 1rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .welcome-section h2 {
    font-size: 2rem;
  }
  
  .feature-grid {
    grid-template-columns: 1fr;
  }
  
  .hanzi-btn {
    font-size: 2rem;
    padding: 15px 20px;
  }
  
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
</style>